<template>
  <div class="successBox">
    <i class="el-icon-success" style="font-size:40px;color:green" />
    <h1 style="color:green">恭喜，授权成功</h1>
    <h4>{{ second }}秒后自动跳转...</h4>
  </div>
</template>

<script>
export default {
  props: ['jump_url'],
  data() {
    return {
      second: 3
    }
  },
  created() {
  },
  mounted() {
    const timer = setInterval(() => {
      if (this.second === 1) {
        clearInterval(timer)
        window.location.replace(this.jump_url);
        return
      }
      this.second--
    }, 1000)
  }
}
</script>

<style ang="scss" scoped>
.successBox {
    width: 100%;
    height: 100%;
    text-align: center;
    margin: 250px auto;
}
</style>
